

********************************************************************************
* Figure 4: On-the-run Yields
********************************************************************************

*********************************
* (A) 10y on-the-run Treasury yield
*********************************

use "../data/final_data_fed_secular_decline", clear

keep if date >= mdy(6,1,1989)
drop if date >= mdy(7,1,2021)

local x "usgg10_chg"

sort date
generate FOMC_change  = `x'  if  !missing(fomc_meet[_n+1]) | !missing(fomc_meet) | !missing(fomc_meet[_n-1])

gen cum_`x'			= sum(`x')
gen cum_FOMC_change = sum(FOMC_change)

line cum_`x' cum_FOMC_change date, ///
scheme(s1mono) lcolor(gs6 red) ///
xlabel(, format(%tdCCYY)) ///
ylabel(, angle(horizontal)) ///
ytitle("Cumulative yield change (%)") ///
xtitle("") ///
legend(cols(1) pos(2) ring(0) symxsize(*0.5) ///
label(1 "10y Treasury yield") label(2 "10y Treasury yield change around FOMC meetings") )
graph export "../figures/figure4a.png", replace	



*********************************
* (B) 10y on-the-run TIPS yield
*********************************
	
use "../data/final_data_fed_secular_decline", clear

keep if date > mdy(1,31,1997)
drop if date >= mdy(7,1,2021)

local x "gtii10_chg"

sort date
generate FOMC_change  = `x'  if  !missing(fomc_meet[_n+1]) | !missing(fomc_meet) | !missing(fomc_meet[_n-1])

gen cum_`x'			= sum(`x')
gen cum_FOMC_change = sum(FOMC_change)

line cum_`x' cum_FOMC_change date, ///
scheme(s1mono) lcolor(gs6 red) ///
xlabel(, format(%tdCCYY)) ///
ylabel(, angle(horizontal)) ///
ytitle("Cumulative yield change (%)") ///
xtitle("") ///
legend(cols(1) pos(2) ring(0) symxsize(*0.5) ///
label(1 "10y TIPS yield") label(2 "10y TIPS yield change around FOMC meetings") )
graph export "../figures/figure4b.png", replace




	
	